﻿using FreeSql;
using FreeSql.DataAnnotations;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace BBCore.Core.Models.Admins
{
    [Table(Name = "HYJ_ANNOUNCEMENT")]
    [Description("公告栏消息")]
    public class Announcement : BaseEntity<Announcement, int>
    {
        [NotNull]
        [Display(Name = "标题")]
        [Required(ErrorMessage = "标题不可为空")]
        public string? Title { get; set; }
        [NotNull]
        [Display(Name = "公布栏内容")]
        [Required(ErrorMessage = "公布栏内容不可为空")]
        public string? Content { get; set; }
        [NotNull]
        [Display(Name = "发布日期")]
        [Required(ErrorMessage = "发布时间不可为空")]
        public DateTime PublishTime { get; set; } = DateTime.Now;
    }
}
